<html xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<ui:composition>
<div id="header-menu">
	<c:forEach items="#{navigationMBean.menuMap}" var="menuItem"
		varStatus="status">
		<c:if
			test="#{(menuItem.right != '') ? securityMBean.isSecurityGranted(menuItem.right) : true}">
			<rich:dropDownMenu mode="server" label="#{menuItem.name}"
				showDelay="0" hideDelay="0" horizontalOffset="2">
				<c:forEach items="#{menuItem.subMenu}" var="subMenu">
					<c:if
						test="#{(subMenu.right != '') ? securityMBean.isSecurityGranted(subMenu.right) : true}">
						<rich:menuItem label="#{subMenu.name}"
								action="#{subMenu.execute}">
							</rich:menuItem>
					</c:if>
				</c:forEach>
			</rich:dropDownMenu>

		</c:if>
	</c:forEach>
</div>
</ui:composition>

</html>